from enum import Enum

class Const:
    class ConstError(TypeError):
        pass
    class ContestCaseError(ConstError):
        pass

    def __setattr__(self, __name: str, __value: any) -> None:
        if self.__dict__.has_key(__name):
            raise self.ConstError(f'Can\'t change const.{__name}')
        if not __name.isupper():
            raise self.ConstCaseError(f'const name "{__name}" is not all uppercase')
        self.__dict__[__name] = __value

Const.MAX_RE_LEN = 64
Const.EPSILON = '𝜀'

class StateType(Enum):
    OTHER = 0
    END = 1


